
<%@ page import="javax.xml.parsers.DocumentBuilderFactory" %>
<%@ page import="javax.xml.parsers.DocumentBuilder" %>
<%@ page import="org.xml.sax.SAXException" %>
<%@ page import="org.w3c.dom.NodeList" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.List" %>
<%@ page import="org.w3c.dom.Node" %>
<%@ page import="org.w3c.dom.Element" %>
<%@ page import="org.jsoup.Jsoup" %>
<%@ page import="org.w3c.dom.Document" %>
<%@ page import="org.jsoup.select.Elements" %>
<%@ page import="dep.domain.Records" %>
<%@ page import="java.net.URL" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/6/10
  Time: 9:25
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    //1、创建解析器工厂对象 DocumentBuildFactory对象
    DocumentBuilderFactory dbf =  DocumentBuilderFactory.newInstance();
    List list = new ArrayList();
    try {
        //2、由解析器工厂对象创建解析器对象，即DocumentBuilder对象
        DocumentBuilder db = dbf.newDocumentBuilder();
        //3、由解析器对象对指定XML文件进行解析，构建相应的DOM树，创建Document对象，生成一个Document对象
        org.w3c.dom.Document doc =  db.parse("http://localhost/xml/swiper.xml");
        NodeList swiper = doc.getElementsByTagName("swiper");
        for (int i=0;i<swiper.getLength();i++){
            NodeList childNodes = swiper.item(i).getChildNodes();
            for(int k=0;k<childNodes.getLength();k++){
                if(childNodes.item(k).getNodeType()==Node.ELEMENT_NODE){
                   // System.out.println(childNodes.item(k).getNodeName());
                    String nodeValue = childNodes.item(k).getFirstChild().getNodeValue();
                    list.add(nodeValue);
                    break;
                    //System.out.println(childNodes.item(k).getTextContent());
                }
            }
        }
       // System.out.println(list.toString());
    } catch (SAXException e) {
        e.printStackTrace();
    }
   pageContext.setAttribute("list",list);


%>
<html>
<head>
    <meta charset="UTF-8">
    <title>芝麻优购-综合网购首选-正品低价、品质保障、配送及时、轻松购物！</title>
    <meta name="description" content="芝麻优购ZM.COM-专业的综合网上购物商城,销售家电、数码通讯、电脑、家居百货、服装服饰、母婴、图书、食品等数万个品牌优质商品.便捷、诚信的服务，为您提供愉悦的网上购物体验!">
    <meta name="keywords" content="网上购物,网上商城,手机,笔记本,电脑,MP3,CD,VCD,DV,相机,数码,配件,手表,存储卡,品优购">
    <!-- 引入网页图标 -->
    <link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
    <!-- 初始化css文件 -->
    <link rel="stylesheet" type="text/css" href="css/base.css">
    <link rel="stylesheet" type="text/css" href="css/common.css">
    <link rel="stylesheet" type="text/css" href="css/index.css">
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script src="js/main.js"></script>
    <script type="text/javascript" src="js/index.js"></script>
    <script type="text/javascript" src="js/include.js"></script>
    <script>
        $(function () {
            $("#slide").css("height",455);
        })
    </script>
</head>
<body >
<div id="header"></div>
<div style="background: url(images/bg.png.webp) no-repeat">
    <div class="w" >
    <div class="main" >
        <!--			轮播图start-->
        <div class="focus fl">
<%--            <div class="trent-slider">--%>

        <div class="trent-slider" id="slide">
                <c:forEach items="${list}" var="str" varStatus="s">
                    <div class="t-slide current-t-slide">
                        <a href="/list.jsp?query=女装">       <img src="${str}" alt="" /></a>
                    </div>
                </c:forEach>
                <div class="t-slider-controls" >
                    <div class="arrow right-arrow">
                        <div class="arrow-container">
                            <div class="arrow-icon" style="text-align: center">&gt;</div>
                        </div>
                    </div>
                    <div class="arrow left-arrow">
                        <div class="arrow-container">
                            <div class="arrow-icon" style="text-align: center">&lt;</div>
                        </div>
                    </div>
                    <div class="t-dots-container">
                        <div class="t-slide-dots-wrap"><div class="t-slide-dots"></div></div>
                    </div>
                </div>
            </div>

        </div>
        <!--			轮播图end-->
        <div class="news fr" style="background-color: #FFFFFF">
            <div class="news-top">
                <div class="news-h">
                    芝麻优购快报
                    <a href="">更多 &#xea50</a>
                </div>
                <div class="news-b">
                    <ul>
                        <li><a href="">【特惠】爆款服装5折</a></li>
                        <li><a href="">【特惠】全场9.9包邮,全场9.9</a></li>
                        <li><a href="">【特惠】爆款服装5折</a></li>
                        <li><a href="">【特惠】adidas只要9999元</a></li>
                        <li><a href="">【特惠】nike,newbalance满300-30</a></li>
                    </ul>
                </div>
            </div>
            <div class="lifeservice">
                <ul>
                    <li><a href=""><i class="spriteico"></i><p>话费</p></a></li>
                    <li class="position"><a href=""><i class="spriteico"></i><p>话费</p><div class="hot"><img src="images/jian.jpg"></div></a></li>
                    <li><a href=""><i class="spriteico"></i><p>话费</p></a></li>
                    <li><a href=""><i class="spriteico"></i><p>话费</p></a></li>
                    <li><a href=""><i class="spriteico"></i><p>话费</p></a></li>
                    <li><a href=""><i class="spriteico"></i><p>话费</p></a></li>
                    <li><a href=""><i class="spriteico"></i><p>话费</p></a></li>
                    <li><a href=""><i class="spriteico"></i><p>话费</p></a></li>
                    <li><a href=""><i class="spriteico"></i><p>话费</p></a></li>
                    <li><a href=""><i class="spriteico"></i><p>话费</p></a></li>
                    <li><a href=""><i class="spriteico"></i><p>话费</p></a></li>
                    <li><a href=""><i class="spriteico"></i><p>话费</p></a></li>

                </ul>
            </div>
            <div class="bargain"><img src="upload/bargain.jpg"></div>
        </div>
    </div>
</div>
</div >

    <!-- 固定导航栏 -->
    <div class="fix">
        <ul>
            <li class="current1"><a href="">芝麻优购</a></li>
            <li><a href="">今日推荐</a></li>
            <li><a href="">猜你喜欢</a></li>
            <li><a href="">品优趣区</a></li>
            <li><a href="">家用电器</a></li>
            <li><a href="">手机通讯</a></li>
        </ul>
    </div>
    <!-- 推荐服务 -->
    <div class="recommend w data-index">
        <div class="re-left fl">
            <img src="images/clock.png">
            <h3>今日推荐</h3>
        </div>
        <div class="re-right fl">
            <ul>
                <li><a href=""><img src="upload/reco1.jpg"></a></li>
                <li><a href=""><img src="upload/reco2.png"></a></li>
                <li><a href=""><img src="upload/reco3.png"></a></li>
                <li><a href=""><img src="upload/reco4.png"></a></li>
            </ul>
        </div>
    </div>
    <!-- 猜你喜欢 -->
    <div class="guesslove w data-index">
        <div class="love-top"><span class="love-top-left fl">猜你喜欢</span><span class="love-top-right fr">换一批</span></div>
        <div class="love-content">
            <div class="love-img fl"><a href=""><img src="upload/love1.png" alt=""></a></div>
            <div class="love-img fl"><a href=""><img src="upload/love2.png" alt=""></a></div>
            <div class="love-img fl"><a href=""><img src="upload/love3.png" alt=""></a></div>
            <div class="love-img fl"><a href=""><img src="upload/love4.png" alt=""></a></div>
            <div class="love-img fl"><a href=""><img src="upload/love5.png" alt=""></a></div>
            <div class="love-img fl"><a href=""><img src="upload/love6.png" alt=""></a></div>
            <!-- 对应描述 -->
            <div class="love-description fl"><span>阳光没报新款单肩包女包时尚子母包四件套女</span><p>￥116.00</p></div>
            <div class="love-description fl"><span>爱仕达30CM炒锅不粘锅NWG8330E电磁炉</span><p>￥99.00</p></div>
            <div class="love-description fl"><span>捷波朗 <br>(jabra)BOOSI劲步</span><p>￥245.00</p></div>
            <div class="love-description fl"><span>阳光没报新款单肩包女包时尚子母包四件套女</span><p>￥116.00</p></div>
            <div class="love-description fl"><span>阳光没报新款单肩包女包时尚子母包四件套女</span><p>￥116.00</p></div>
            <div class="love-description fl"><span>阳光没报新款单肩包女包时尚子母包四件套女</span><p>￥116.00</p></div>
        </div>
    </div>
    <!-- 商品 -->
    <div class="shop w data-index">
        <div class="shop-top">
            <span class="fl">品优购.有趣区</span>
        </div>
        <div class="shop-content">
            <div class="shop-content-left fl"><a href=""><img src="upload/shop1.png"></a></div>
            <div class="shop-content-right fl">
                <div class="sleft fl">
                    <div class="sleft-top"><h4>好东西</h4></div>
                    <div class="sleft-m"><a href=""><img src="upload/shop2.png"></a></div>
                    <div class="sleft-b"><a href=""><img src="upload/shop3.png"></a></div>
                </div>
                <div class="smoddle fl">
                    <div class="smoddle-top">品牌街</div>
                    <div class="smoddle-1"><a href=""><img src="upload/shop4.png"></a></div>
                    <div class="smoddle-2"><a href=""><img src="upload/shop5.png"></a></div>
                </div>
                <div class="sright fl"><a href=""><img src="upload/shop6.png"></a></div>
            </div>
        </div>
    </div>

    <!-- 楼层区 -->
    <div class="floor">
        <div class="jiadian w data-index">
            <div class="box-hd"><h3 class="fl">家用电器</h3>
                <div class="tab-list fr">
                    <ul>
                        <li><a href="" class="red">热门</a>|</li>
                        <li><a href="">大家电</a>|</li>
                        <li><a href="">生活电器</a>|</li>
                        <li><a href="">厨房电器</a>|</li>
                        <li><a href="">高端电器</a>|</li>
                        <li><a href="">洗衣机</a>|</li>
                        <li><a href="">电视</a></li>
                    </ul>
                </div>
            </div>
            <div class="box-bd">
                <ul class="tab-con">
                    <li>
                        <ul class="tab-con-list">
                            <li><a href="">节能补贴</a></li>
                            <li><a href="">节能补贴</a></li>
                            <li><a href="">节能补贴</a></li>
                            <li><a href="">节能补贴</a></li>
                            <li><a href="">节能补贴</a></li>
                            <li><a href="">节能补贴</a></li>
                        </ul>
                        <img src="upload/floor-1-1.png">
                    </li>
                    <li><img src="upload/pic1.jpg"></li>
                    <li><div class="tab-con-item">
                        <a href=""><img src="upload/floor-1-2.png" alt=""></a></div>
                        <div class="tab-con-item">
                            <a href=""><img src="upload/floor-1-3.png" alt=""></a></div>
                    </li>
                    <li><div class="tab-con-item">
                        <a href=""><img src="upload/floor-1-4.png" alt=""></a></div></li>
                    <li><div class="tab-con-item">
                        <a href=""><img src="upload/floor-1-5.png" alt=""></a></div>
                        <div class="tab-con-item">
                            <a href=""><img src="upload/floor-1-6.png" alt=""></a></div></li>
                </ul>
            </div>
        </div>

    </div>

    <div id="footer"></div>

</body>
</html>

